<?php
$isfun	=	"curl";
$url	=	"http://www.3zcn.com/".$_GET["i"];
echo $url;
$file	=	curl($url);
echo $file;



function curl($openurl){
	global $isfun;
	if($isfun=="curl"){
	$ch = curl_init($openurl);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$file = curl_exec($ch);
	curl_close($ch);
	}
	elseif($isfun=="fopen"){
		$file=open($openurl);
	}
	else{ echo "<script>alert('你的空间不支持本程序，谢谢使用');window.close();</script>";}
	return $file;
}

function open($file,$type=''){
/*
读取远程页面
*/
        global $fromurl,$referer;
        $cachename=$file;
                if($type){
                        $file=$fromurl.'/'.$type.'/'.$file;
                }else{
                        $file=$fromurl.$file;
                }
                        if($open=file($file)){
                                        $count=count($open);
                                        for($i=0;$i<$count;$i++){
                                                $theget.=$open[$i];
                                        }
                                }else{
                                        die('请求过多，超时，请刷新');
                                }
        return $theget;
}
?>